﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace SlackOff
{
    public class NoneState : ITimeState
    {
        private ITimeStateContext context;

        private readonly string description;

        public NoneState(ITimeStateContext context)
        {
            this.context = context;
            this.description = (new TimeLeft(this.context.Options.WorkingTimeMinutes)).GetTimeLeft().ToString();
        }
        public Status Status => Status.None;

        public string GetDescription() => this.description;

        public void Start()
        {
            this.context.ChangeState(new WorkingTimeState(this.context));
        }

        public bool CanStart
        {
            get
            {
                return true;
            }
        }

        public void Delay()
        {

        }

        public bool CanDelay
        {
            get
            {
                return false;
            }
        }

        public void TryFinish()
        {

        }


        public string StartButtonText => String.Format(this.context.Options.NoneStateStartButtonText, this.context.Options.WorkingTimeMinutes);
        public string DelayButtonText => String.Format(this.context.Options.NoneStateDelayButtonText,this.context.Options.WorkingDelayingMinutes);
 
    }
}
